<?php

const AUTO_PATH_ARR = ['Sen','c','m','Control','Model','module','Cache','Database','Queue'];
//使用匿名函数注册自动加载
spl_autoload_register(function ($class){
    $class_arr = explode('_', $class);
    if(in_array($class_arr[0],AUTO_PATH_ARR)) {
        $file_path = implode("/", $class_arr) . '.php';
        require_once $file_path;
    } else {
        echo '找不到类：'.$class;
        exit;
    }
});